//generate all subset
#include <vector>
#include <iostream>
#include <iterator>
#include <algorithm>

bool is_a_solution(const std::vector<bool>& a, int k, int n) {
	return k == n;
}

void process_solution(const std::vector<bool>& a, const std::vector<int>& set) {
	std::cout << "{ ";
	for (int i = 0; i < a.size(); ++i)
		if (a[i] == true)
			std::cout << set[i] << " ";
	std::cout << " }\n";
}

void construct_candidates(std::vector<bool>& c){
	c[0] = true;
	c[1] = false;
}

void backtrack(std::vector<bool>& a, int k, int n, const std::vector<int>& set){
	std::vector<bool> c(2);
	if (is_a_solution(a,k, n))
		process_solution(a, set);
	else {
		construct_candidates(c);
		for (int i = 0; i < c.size(); ++i) {
			a[k] = c[i];
			backtrack(a,k+1,n,set); 
		}
	}
}

void test_backtrack_subset(){
	int start, n;
	while(std::cin >> start && std::cin >> n){
		std::vector<int> set(n);
		for (int i = 0; i < n; ++i)
			set[i] = start+i;
		std::vector<bool> a(n);
		backtrack(a, 0, n, set);
	}
}